from apscheduler.schedulers.background import BackgroundScheduler
from apscheduler.executors.pool import ThreadPoolExecutor, ProcessPoolExecutor
from flask import Flask
from model_ports import XpScore
# from config import *
app = Flask(__name__)
app.register_blueprint(XpScore)
executor = ThreadPoolExecutor(max_workers=8)
schedulers = BackgroundScheduler(executors = {'default': executor, 'processpool': ProcessPoolExecutor(16)})
# schedulers.add_job(load_data, args=[data_path, ], id='job_cron', trigger='cron', hour=0,  minute=0, second=0,replace_existing=True)
schedulers.start()

if __name__ == '__main__':
    app.run(host='0.0.0.0',port=9992)
